home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_nub_sarcsecret.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
117 lines
# Jones 3D Cog Script
#
# NUB_sarcSecret.cog
#
# [GGJ]
#
# (C) 1999 LucasArts Entertainment Co. All Rights Reserved
#
# ========================================================================================
symbols
message activated
message startup
message arrived
thing sarc
thing lid
thing button
thing sarcCam
thing sarcTarg
thing actorGhost
thing actor local
surface hole
sound stopSnd=gen_stone_stop_c.wav local
sound moveSnd=teo_spike_block_c.wav local
template tplActor=indy_sh_actor local
keyframe pushButton=in_activate_medium.key local
flex tempRotVel local
int curCam local
int player local
int moving local
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
return;
activated:
if (GetSenderRef() != button) return;
if (IsMoving(sarc)) return;
StartCutscene(1);
curCam=GetCurrentCamera();
SetAdjoinFlags(hole, 0x2);
SetCameraLookInterp(2, 0);
SetCameraFocus(2, sarcCam);
SetCameraSecondaryFocus(2, sarcTarg);
SetCurrentCamera(2);
MakeMeStop();
DeselectWeaponWait(player);
#Create an actor at the player's location and swap them out
actor = CreateThing(tplActor, actorGhost);
CopyPlayerHolsters(player, actor);
CaptureThing(actor);
CopyPlayerHolsters(player, actor);
SetThingFlags(player, 0x80000);
ClearThingFlags(actor, 0x80000);
PlayKey(actor, pushButton, 4, 0x12, 0);
Sleep(0.5);
MoveToFrame(button, 1, 0.5);
Sleep(0.5);
MoveToFrame(SarcCam, 1, 0.3);
MoveToFrame(Sarctarg, 1, 0.3);
Sleep(1.0);
moving=PlaySoundThing(moveSnd, sarc, 1.0, -1.0, -1.0, 0x81);
MoveToFrame(sarc, 1 - GetCurFrame(sarc), 0.5);
AttachThingToThing(lid, sarc);
tempRotVel=GetThingMaxRotVel(actor);
SetThingMaxRotVel(actor, 150.0);
AISetLookThing(actor, sarc);
Sleep(3.0);
CopyOrientandPos(actor, player);
SetThingMaxRotVel(actor, tempRotVel);
SetThingFlags(actor, 0x80000);
ClearThingFlags(player, 0x80000);
ClearActorFlags(player, 0x200000);
DestroyThing(actor);
SetCurrentCamera(curCam);
MoveToFrame(SarcCam, 0, 5.0);
MoveToFrame(Sarctarg, 0, 5.0);
MoveToFrame(button, 0, 0.5);
EndCutscene();
return;
arrived:
if (GetSenderRef() == sarc)
{
StopSound(moving, 0.0);
PlaySoundThing(stopSnd, sarc, 1.0, -1.0, -1.0, 0x0);
ClearAdjoinFlags(hole, 0x2);
}
return;
end